/*
 * Copyright (c) 2006, 2022, webrx.cn All rights reserved.
 *
 */
package cn.webrx;

import java.text.NumberFormat;
import java.text.SimpleDateFormat;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.LocalTime;
import java.time.format.DateTimeFormatter;

/**
 * <p>Project: jse2204 - Op5
 * <p>Powered by webrx On 2022-08-30 10:02:43
 *
 * @author webrx [webrx@126.com]
 * @version 1.0
 * @since 17
 */
public class Op5 {
    public static void main(String[] args) {
        System.out.println(3*2*2);//12
        System.out.println(3<<2);//12
        System.out.println(9*2*2*2);//72
        System.out.println(9<<3);//72
        System.out.println(6&3); //0b10 输入十进制就是2
        System.out.println(Integer.toBinaryString(6));
        System.out.println(Integer.toBinaryString(3));
        //110   110
        //11    011  010  10
        System.out.println(0b10);
        //0000 0110
        //011  6 | 3 = 0b111 输出就是7
        //111
        System.out.println(0b111);

        System.out.println(0b101);

        //3<<1 输出6
        System.out.println(3<<2);
        System.out.println(Integer.toBinaryString(3));//11
        //00000110
        System.out.println(0b110);
        System.out.println(0b1100);
        System.out.println(3>>1);
        System.out.println(3>>2<<2);
        //0000 0001


        //三元运算表达式
        int i  = true ? 10 : 20;
        System.out.println(i);
        System.out.println(!!false ? "yes" : "no");

        String str  = true ? "ok" :  "11111";
        System.out.println(str);

    }
}
